import json
collect_keys = []
with open("Opcodes.txt", "r") as f:
    opcodes_data = json.load(f)
for opcode, data in opcodes_data["cbprefixed"].items():
    operands = data['operands']
    for operand in operands:
        for key in operand.keys():
            if key not in collect_keys:
                collect_keys.append(key)
for opcode, data in opcodes_data["unprefixed"].items():
    operands = data['operands']
    for operand in operands:
        for key in operand.keys():
            if key not in collect_keys:
                collect_keys.append(key)
print(collect_keys)